﻿using Microsoft.EntityFrameworkCore;

namespace openiddict.demo
{
    public class ApplicationDbContext : DbContext
    {
        public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options) : base(options)
        {
        }

        public DbSet<User> Users { get; set; }

        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
            base.OnModelCreating(modelBuilder);
            // Add any additional model configurations here

            // 注册 OpenIddict EF Core 实体
            modelBuilder.UseOpenIddict(); 
        }

    }
}
